package chapter_7;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test7 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\a.jpg");
        FileOutputStream fos = new FileOutputStream("D:\\b.jpg");
        byte[] bytes = new byte[1024];
        int len ;
        while((len  = fis.read(bytes)) != -1){
            fos.write(bytes,0,len);
        }
        fos.close();
        fis.close();
    }
}
